home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / misc / sortham.readme < prev    next >
Encoding:
Text File  |  1992-06-14  |  3.2 KB  |  90 lines

  1. Short: Sort file containting amateur radio call signs
  2.  
  3. sortham     Sort an input file containing an amateur radio call sign in
  4.         column 1.  Version 1.0 05/30/92 Freeware by Vince Herried, KA8CTE.
  5.         This version should work on AmigaDos versions 1.0 and greater.
  6.         It has only been tested on AmigaDos V2.04.
  7.  
  8.         Amateur call signs are assumed to be less than 7 characters in
  9.         length of the following format.
  10.         PNS - where the prefix P is one or two alphabetic characters,
  11.           where the number N is a digit from 0 to 9, and
  12.           the suffix S is one to three characters.
  13.  
  14.  
  15.         THEORY OF OPERATION
  16.  
  17.         The program doesn't actually sort the input lines, rather it
  18.         sorts pointers to the input lines.  Memory is allocated for
  19.         the input file and for the pointers (one needed for each line).
  20.  
  21.         As the file is read in, a null character is added at the
  22.         end of each line, thus the input buffer needs to be larger
  23.         than the actual file size.
  24.  
  25.         Aztec's Manx C qsort is called with a comparison exit.
  26.  
  27.         The comparison exit builds a work area for each call sign
  28.         and re-arranges it (use the above notation) NSP or number,
  29.         suffix,prefix.  It then uses a standard C compare and returns
  30.         to the qsort exit.
  31.  
  32.         RESTRICTIONS
  33.  
  34.         Input lines longer than 255 characters are truncated.
  35.  
  36.         Call signs are less than seven characters long.
  37.  
  38.         This version requires the call sign to be in column one.
  39.         Version two will probably allow the call sign to be embedded.
  40.  
  41.         Ya get what you pay for, if it don't work for you, well
  42.         I'm sorry, it works ok for me.
  43.  
  44.  
  45.         ERROR MESSAGES
  46.  
  47.  
  48.            "SRTH001E: can't access FILENAME"
  49.              Selfexplainatory, I hope.  Misspelled file name?
  50.  
  51.            "SRTH002I - ta =%s, tb =%s"
  52.              Debugging info, you'll never see this.
  53.  
  54.            "SRTH003E - open failed for FILENAME"
  55.              Unable to open input file (read protected?)
  56.  
  57.            "SRTH004E - Unable to allocate memory for data buffer!"
  58.              you don't have enough free system memory available
  59.              to hold the input file.  Try breaking the file up
  60.              into multiple parts.
  61.  
  62.            "SRTH005E - Unable to allocate memory for pointer buffer!"
  63.              sortham also needs a bunch of memory pointers.
  64.              Maybe V2 will be a little bit smarter, this version
  65.              assumes that each line is very short, thus if your
  66.              data lines are more than 8 characters long it
  67.              allocates more memory for this buffer than
  68.              it needs.  I did this rather than make multiple
  69.              passes on the data or require you to enter an average
  70.              line size.  Try breaking the file up into multiple parts.
  71.  
  72.            "SRTH006E - oops it doesn't fit?"
  73.              I guessed wrong on the size of the buffer needed for
  74.              the input file.  Probably because the file is very short
  75.              and or all input lines are are very short eg 1x2.
  76.              Pad one line out with text to make it longer (20 - 30
  77.              characters should do it).
  78.  
  79.            "SRTH007E - oops not enough room in the pointer buffer!"
  80.              Same problem SRTH007E.  Pad a line out with text to
  81.              make it longer.
  82.  
  83.  
  84.  
  85.  
  86.         Address Comments to:
  87.         Vincent Herried  KA8CTE
  88.         1688 Staffordshire RD.
  89.         Columbus, OH. 43229-2142
  90.